package com.example.aotdemo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
public class UserConfig {
    /*@Bean("user")
    public User user(){
        return new User("12121123");
    }*/

    @Bean//("employee")
    public UserFactoryBean userFactoryBean(){
        return new UserFactoryBean();
    }

    @Bean(initMethod = "init")
    public MyInitializingBean test(){
        return  new MyInitializingBean();
    }

    @Bean(destroyMethod = "cleanUp")
    public MyDisposableBean myDisposableBean(){
        return new MyDisposableBean();
    }


}



